#!/bin/bash

source $DRAW_INI
source $DRAW_CFG

java -Xmx2g -jar $GENOMICS_JAR/QualityScoreDistribution.jar \
  INPUT=${1} \
  OUTPUT=quality_table \
  CHART_OUTPUT=${2} \
  VALIDATION_STRINGENCY=SILENT \
  TMP_DIR=$TMPDIR \
  ALIGNED_READS_ONLY=TRUE \
  PF_READS_ONLY=TRUE 

EXITSTATUS=$?

if [ ! -s "${2}" ]; then exit 100;fi;

exit $EXITSTATUS
